#!/usr/bin/bash


# 资源文件目录
FILES_HOME=./files

# 容器数据目录
CONTAINER_HOME=/data/container



# 复制Nginx配置

cp -R ${FILES_HOME}/nginx/ ${CONTAINER_HOME}/nginx/


# 复制MySQL配置

mkdir -p ${CONTAINER_HOME}/mysql/conf/conf.d;
mkdir -p ${CONTAINER_HOME}/mysql/data;

cp -R ${FILES_HOME}/mysql/* ${CONTAINER_HOME}/mysql/


# 创建Redis文件目录

mkdir -p ${CONTAINER_HOME}/redis/conf/;
mkdir -p ${CONTAINER_HOME}/redis/data;

# 创建RabbitMQ目录
mkdir -p ${CONTAINER_HOME}/rabbitmq;

# 创建Zookeeper目录\

mkdir -p ${CONTAINER_HOME}/zookeeper/config;
mkdir -p ${CONTAINER_HOME}/zookeeper/data;
mkdir -p ${CONTAINER_HOME}/zookeeper/datalog;

# 创建Mongo目录

mkdir -p ${CONTAINER_HOME}/mongo/data;

# 创建Minio目录

mkdir -p ${CONTAINER_HOME}/minio/data;
mkdir -p ${CONTAINER_HOME}/minio/config;

# Nacos
mkdir -p ${CONTAINER_HOME}/nacos-server/conf;
mkdir -p ${CONTAINER_HOME}/nacos-server/logs;
mkdir -p ${CONTAINER_HOME}/nacos-server/data;
cp -R ${FILES_HOME}/nacos-server/ ${CONTAINER_HOME}/nacos-server/
